package formulacion;

public class Disco implements Cloneable 
{
	private int tamanyo;
//
	public Disco()
	{}
	
	public Disco(int tamanyo)
	{
		this.tamanyo = tamanyo;
	}
	
	@Override
	public String toString() {
		return ("D"+ tamanyo);
	}
	
	public Object clone() 
	{
		Disco disco = new Disco();
		disco.tamanyo = this.tamanyo;
		return disco;
	}
	
	public boolean equals(Object obj) 
	{
		if(obj != null && obj instanceof Disco)
		{
			Disco d = (Disco)obj;
			return this.tamanyo == d.getTamanyo();
		}
		else
			return false;
	}

	public int getTamanyo() 
	{
		return tamanyo;
	}

	public void setTamanyo(int tamanyo) 
	{
		this.tamanyo = tamanyo;
	}
}
